Parameter Types
VectorScript provides several parameter field types for use with plug-ins:
*
*
*
*
*
*
*
*
*
*
*
Parameter records can have multiple parameter fields of the same type, or combinations of parameter fields of different types. The following sections document each parameter type in detail.
Integer
Integer parameters store a single INTEGER data value.
An integer parameter value is displayed in the Object Info palette in an editable field, and can be edited as desired. Integer parameter fields support calculations in the field, fractional values entered into an integer parameter field will be rounded to the nearest value.
Integer parameters do not support unit marks or unit conversion.
Boolean
Boolean parameters store a single BOOLEAN data value.
A boolean parameter is displayed in the Object Info palette as a check box, with the state of the check box indicating the TRUE-FALSE state of the value (TRUE = checked, FALSE = unchecked).
Boolean parameters do not support unit marks or unit conversion.
Number
Number parameters store a single REAL data value.
A number parameter value is displayed in the Object Info palette in an editable field, and can be edited as desired. Number parameter fields support calculations in the field, and fractional values entered into a number parameter field will be displayed using the current units fractional display setting.
Number parameters do support unit marks or unit conversion.
Text
Text parameters store a single string data value. The stored value may be up to 255 characters in length.
A text parameter value is displayed in the Object Info palette in an editable field, and can be edited as desired.
Popup
Popup parameters store a single STRING data value that is selected from a predefined list of values. The list of available values is defined in the parameter definition dialog box, and cannot be modified during script execution.
Popup parameter values are displayed in the Object Info palette as popup menu listing the defined value options. The active parameter value (the value which is stored in the parameter) is indicated by the value displayed in the popup when the control is not selected, and by a bullet next to the item when the control is selected. To modify the value, select the desired parameter value from the popup control.
Radio Button
Radio button parameters store a single STRING data value that is selected from a predefined list of values. The list of available values is defined in the parameter definition dialog box, and cannot be modified during script execution.
Radio button parameter values are displayed in the Object Info palette as a series of radio buttons in a group box, with one radio button for each defined value. The active parameter value (which is stored in the parameter) is indicated by the selected radio button. To modify the value, select the radio button corresponding to the desired value.
Dimension
Dimension parameters store a dimension data value as a REAL numeric value.
A dimension parameter value is displayed in the Object Info palette in an editable field, and the value can be edited as desired. Dimension parameter fields support calculations in the field, and fractional values entered into a dimension parameter field will be displayed using the current unit’s fractional display setting.
Two default values can be specified—one for Imperial units, and one for Metric. The appropriate dimension is automatically displayed for the plug-in depending on the file’s units setting. Entering two default values is not required; if one default is left blank, the other value is converted to the appropriate value for the units in the file.
Plug-ins from versions of VectorWorks earlier than 12 are automatically saved with the dual default value capability when the plug-in is edited. The single existing default dimension, if it has a unit, is automatically saved in the appropriate default value field (Imperial or Metric).
Dimension parameters support the use of unit markers with values; values stored in one unit format are automatically converted to an equivalent value if the document unit setting is modified. Units are not required; values without units assume the drawing units and are not converted.
Dimension parameters are not sensitive to changes in the user origin of a document.
X-Coordinate
X-coordinate parameters store a coordinate data value as a REAL numeric value.
A coordinate parameter value is displayed in the Object Info palette in an editable field; the value can be edited as desired. Coordinate parameter fields support calculations in the field, and fractional values entered into a coordinate parameter field will be displayed using the current unit’s fractional display setting.
Coordinate parameters support the use of unit marks with values; values stored in one unit format will be automatically converted to an equivalent value if the document unit setting is modified.
Coordinate parameters are sensitive to changes in the user origin of a document, and are designed to be used with geometric data that is related directly to locations within a VectorWorks document. Values displayed in coordinate fields will be corrected for any changes in the document user origin.
Y-Coordinate
Y-coordinate parameters store a coordinate data value as a REAL numeric value.
A coordinate parameter value is displayed in the Object Info palette in an editable field; the value can be edited as desired. Coordinate parameter fields support calculations in the field, and fractional values entered into a coordinate parameter field will be displayed using the current unit’s fractional display setting.
Coordinate parameters support the use of unit marks with values; values stored in one unit format will be automatically converted to an equivalent value if the document unit setting is modified.
Coordinate parameters are sensitive to changes in the user origin of a document, and are designed to be used with geometric data that is related directly to locations within a VectorWorks document. Values displayed in coordinate fields will be corrected for any changes in the document user origin.
Control Points
Control point parameters are a specialized parameter type designed to create control points in plug-in objects. A control point is similar to a selection handle and allows the user to click and drag to reshape the object. When created, a control point parameter consists of two linked coordinate parameters. The two parameters correspond to x- and y-coordinate fields for the control point.
Control point parameters are displayed in the Object Info palette as a pair of editable coordinate fields; the values can be edited as desired. Control points, like coordinate fields, support calculations in the fields. Fractional values entered into a control point parameter field will be displayed using the current unit’s fractional display setting.
Control point parameters support the use of unit marks with values; values stored in one unit format will be automatically converted to an equivalent value if the document unit setting is modified.
Control point parameters are sensitive to changes in the user origin of a document, and values displayed in the field will be corrected for any changes in the document user origin.
Control point fields can be renamed by entering a display name in the alternate name field of the parameter. This value will be used as the control label in the Object Info palette; when referring to the parameter in a script, use the actual definition name of the parameter.
Static Text
Static text parameters are used to display information on the Object Info palette. The information is for display purposes, and cannot be edited by the user. This type of parameter might display a calculated field, like the area or volume of an object, or some other property. Each instance of the object in a drawing can display a different value for this parameter.

Using VectorScript Plug-ins : Plug-in Parameter Types : Parameter Types

Nemetschek NA
Phone: 410.290.5114
Fax: 410.290.8050